package chapter01

object Test22_Break {
  def main(args: Array[String]): Unit = {
    scala.util.control.Breaks.breakable{
      while(true){
        println("请输入你的年龄：")
        val age = scala.io.StdIn.readInt()
        if(age>=18){
          println("可以进入")
          scala.util.control.Breaks.break
        }
      }
    }
  }
}
